package com.pda.yuanjing.pages.kcpd;

import com.pda.yuanjing.beanout.JDBeanDNewOut;
import com.pda.yuanjing.beanout.JDBillBeanOut;
import com.public_module.basemvp.present.BasePresenter;

import java.util.List;

public class CBillPresent extends BasePresenter<CBillModel, CBillView> implements CBillModel.CallBack {

    public void showlist( String id, String name, String billCode) {
        view.showProgress();
        model.showlist( id,name,billCode,this);
    }

    public void showDeatail( String id, String name, String batchId) {
        view.showProgress();
        model.showDeatail( id,name,batchId,this);
    }

    @Override
    public void onshowp(List<JDBillBeanOut.DataBean> list) {
        if(view!=null)
        {
            view.hideProgress();
            view.showlist(list);
        }
    }

    @Override
    public void ongoDeatail(JDBeanDNewOut dataBean) {
        if(view!=null)
        {
            view.hideProgress();
            view.goDeatail(dataBean);
        }
    }

    @Override
    public void ontip(String str) {
        if(view!=null)
        {
            view.hideProgress();
            view.tip(str);
        }
    }
}


